package com.alex.config;

import com.alex.dao.UserDao;
import com.alex.pojo.Role;
import com.alex.pojo.User;
import com.alex.service.UserService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Service;

//@ComponentScan(value = "com.alex")
//@ComponentScan(value = {"com.alex.dao", "com.alex.service", "com.alex.pojo"})
//@ComponentScan(basePackages = "com.alex")
//@ComponentScan(basePackages = {"com.alex.dao", "com.alex.service", "com.alex.pojo"})
//@ComponentScan(basePackageClasses = {UserDao.class, UserService.class, User.class, Role.class})
//@ComponentScan(basePackages = {"com.alex.controller", "com.alex.service", "com.alex.dao", "com.alex.pojo"})
@ComponentScan("com.alex")
@Configuration
public class AppConfig {

    @Bean
    public UserService alex() {
        return new UserService();
    }
}
